Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiline sorting with force-alphabetical-sort #395

Merged
merged 1 commit into from
Mar 27, 2016
Merged

Fix multiline sorting with force-alphabetical-sort #395

merged 1 commit into from
Mar 27, 2016

Conversation

bootandy
Copy link
Contributor

Raised in #364

The separate code for --force-alphabetical-sort has been removed and
a boolean flag added to handle sorting with or without case in the
_module_key function (which handles the sorting).

Note this commit alters these 2 tests:
test_alphabetic_sorting_no_newlines, test_alphabetic_sorting
This results in the lone imports being moved to the top of the file.
I think this is better as it means the force_alphabetical_sort tests
now behave similarly to the other tests in the file.

Please advise if it is ok to change the tests like this.

The big red commit in isort.py is because lines 444 -> 468 were removed and the
if statement was removed

Raised in issue 364.

The separate code for --force-alphabetical-sort has been removed and
a boolean flag added to handle sorting with or without case in the
_module_key function (which handles the sorting).

Note this commit alters these 2 tests:
test_alphabetic_sorting_no_newlines, test_alphabetic_sorting
This results in the lone imports being moved to the top of the file.
I think this is better as it means the force_alphabetical_sort tests
now behave similarly to the other tests in the file.
@timothycrosley
Copy link
Member

Awesome work! Great job reducing the line count while improving the functionality. Thanks!

~Timothy

@timothycrosley timothycrosley merged commit 51d428a into PyCQA:develop Mar 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants